home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / mkfs_efs.z / mkfs_efs
Encoding:
Text File  |  1998-10-20  |  11.2 KB  |  265 lines

  1.  
  2.  
  3.  
  4. mmmmkkkkffffssss____eeeeffffssss((((1111MMMM))))                                                      mmmmkkkkffffssss____eeeeffffssss((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      mkfs_efs - construct an EFS filesystem
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      mmmmkkkkffffssss____eeeeffffssss [----qqqq] [----aaaa] [----iiii] [----rrrr] [----nnnn inodes] special [proto]
  13.      mmmmkkkkffffssss____eeeeffffssss [----qqqq] [----iiii] [----rrrr] special blocks inodes heads sectors cgsize cgalign ialign [proto]
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      _m_k_f_s__e_f_s constructs a filesystem by writing on the _s_p_e_c_i_a_l file using the
  17.      values found in the remaining arguments of the command line.  Normally
  18.      _m_k_f_s__e_f_s prints the parameters of the filesystem to be constructed; the
  19.      ----qqqq flag suppresses this.
  20.  
  21.      If the ----iiii flag is given, _m_k_f_s__e_f_s asks for confirmation after displaying
  22.      the parameters of the filesystem to be constructed.
  23.  
  24.      In it's simplest (and most commonly used form), the size of the
  25.      filesystem is determined from the disk driver.  As an example, to make a
  26.      filesystem on partition 7 (all of the useable portion of an option drive,
  27.      normally) on drive 7 on SCSI bus 0, use:
  28.  
  29.                mkfs_efs /dev/rdsk/dks0d7s7
  30.  
  31.  
  32.      The ----rrrr flag causes _m_k_f_s__e_f_s to write only the superblock, without
  33.      touching other areas of the filesystem.  See the section below on the
  34.      recovery option.
  35.  
  36.      The ----aaaa flag causes _m_k_f_s__e_f_s to align inodes and data on cylinder
  37.      boundaries (equivalent to setting cgalign and ialign to a cylinder size).
  38.      This option can result in a loss of 10MB or more in a filesystem, since
  39.      the resulting cylinder groups are not very flexible in size, and runt
  40.      cylinder groups are not allowed.  Aligning data and inodes with this
  41.      option can result in an increase in performance (about two percent) on
  42.      drives that have a fixed number of sectors per track.  Many SCSI disk
  43.      drives do not have a fixed number of sectors per track, and thus, will
  44.      not see a benefit from this option.
  45.  
  46.      When the first form of _m_k_f_s__e_f_s is used, _m_k_f_s__e_f_s obtains information
  47.      about the device size and geometry by means of appropriate IOCTLs, and
  48.      assigns values to the filesystem parameters on the basis of this
  49.      information.
  50.  
  51.      If the ----nnnn option is present, however, the given number of inodes is used
  52.      rather than the default.  This allows a nonstandard number of inodes to
  53.      be assigned without needing to resort to the long form invocation.
  54.  
  55.      If the second form of _m_k_f_s__e_f_s is used, then all the filesystem
  56.      parameters must be specified from the command line.  Each argument other
  57.      than _s_p_e_c_i_a_l and _p_r_o_t_o is interpreted as a decimal number.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. mmmmkkkkffffssss____eeeeffffssss((((1111MMMM))))                                                      mmmmkkkkffffssss____eeeeffffssss((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      The filesystem parameters are:
  75.  
  76.      _b_l_o_c_k_s    The number of _p_h_y_s_i_c_a_l (512-byte) disk blocks the filesystem
  77.                will occupy.  The current maximum limit on the size of an EFS
  78.                filesystem is 16777214 blocks (two to the 24th power).  This
  79.                can also be expressed as 8 gigabytes.  _m_k_f_s__e_f_s does not
  80.                attempt to make a filesystem larger than this limit.
  81.  
  82.      _i_n_o_d_e_s    The number of inodes the filesystem should have as a minimum.
  83.  
  84.      _h_e_a_d_s     An unused parameter, retained only for backward compatibility.
  85.  
  86.      _s_e_c_t_o_r_s   The number of sectors per track of the physical medium.
  87.  
  88.      _c_g_s_i_z_e    The size of each cylinder group, in disk blocks, approximately.
  89.  
  90.      _c_g_a_l_i_g_n   The boundary, in disk blocks, that a cylinder group should be
  91.                aligned to.
  92.  
  93.      _i_a_l_i_g_n    The boundary, in disk blocks, that each cylinder group's inode
  94.                list should be aligned to.
  95.  
  96.      Once _m_k_f_s__e_f_s has the filesystem parameters it needs, it then builds a
  97.      filesystem containing two directories.  The filesystem's root directory
  98.      is created with one entry, the _l_o_s_t+_f_o_u_n_d directory.  The _l_o_s_t+_f_o_u_n_d
  99.      directory is filled with zeros out to approximately 10 disk blocks, so as
  100.      to allow space for _f_s_c_k(1M) to reconnect disconnected files.  The boot
  101.      program block, block zero, is left uninitialized.
  102.  
  103.      If the optional _p_r_o_t_o argument is given, _m_k_f_s__e_f_s uses it as a prototype
  104.      file and takes its directions from that file.  The blocks and inodes
  105.      specifiers in the _p_r_o_t_o file are provided for backwards compatibility,
  106.      but are otherwise unused.  The prototype file contains tokens separated
  107.      by spaces or new-lines.  A sample prototype specification follows (line
  108.      numbers have been added to aid in the explanation):
  109.  
  110.           1.   /stand/_d_i_s_k_b_o_o_t
  111.           2.   4872 110
  112.           3.   d--777 3 1
  113.           4.   usr  d--777 3 1
  114.           5.   sh   ---755 3 1 /bin/sh
  115.           6.   ken  d--755 6 1
  116.           7.        $
  117.           8.   b0   b--644 3 1 0 0
  118.           9.   c0   c--644 3 1 0 0
  119.           10   fifo p--644 3 1
  120.           11   slink     l--644 3 1 /a/symbolic/link
  121.           12   :  This is a comment line
  122.           13   $
  123.           14.  $
  124.  
  125.      Line 1 is a dummy string.  (It was formerly the bootfilename.)  It is
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. mmmmkkkkffffssss____eeeeffffssss((((1111MMMM))))                                                      mmmmkkkkffffssss____eeeeffffssss((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      present for backward compatibility; boot blocks are not used on SGI
  141.      systems, and _m_k_f_s__e_f_s merely clears block zero.
  142.  
  143.      Note that some string of characters must be present as the first line of
  144.      the proto file to cause it to be parsed correctly; the value of this
  145.      string is immaterial since it is ignored.
  146.  
  147.      Line 2 contains two numeric values (formerly the numbers of blocks and
  148.      inodes).  These are also merely for backward compatibility:  two numeric
  149.      values must appear at this point for the proto file to be correctly
  150.      parsed, but their values are immaterial since they are ignored.
  151.  
  152.      Lines 3-11 tell _m_k_f_s__e_f_s about files and directories to be included in
  153.      this filesystem.
  154.  
  155.      Line 3 specifies the root directory.
  156.  
  157.      lines 4-6 and 8-10 specifies other directories and files.  Note the
  158.      special symbolic link syntax on line 11.
  159.  
  160.      The $$$$ on line 7 tells _m_k_f_s__e_f_s to end the branch of the filesystem it is
  161.      on, and continue from the next higher directory.  It must be the last
  162.      character on a line.  The :::: on line 12 introduces a comment; all
  163.      characters up until the following newline are ignored.  Note that this
  164.      means you cannot have files in a prototype file whose name contains a ::::.
  165.      The $$$$ on lines 13 and 14 end the process, since no additional
  166.      specifications follow.
  167.  
  168.      File specifications give the mode, the user ID, the group ID, and the
  169.      initial contents of the file.  Valid syntax for the contents field
  170.      depends on the first character of the mode.
  171.  
  172.      The mode for a file is specified by a six-character string.  The first
  173.      character specifies the type of the file.  The character range is ----bbbbccccddddppppllll
  174.      to specify regular, block special, character special, directory files,
  175.      named pipes (fifos) and symbolic links, respectively.  The second
  176.      character of the mode is either uuuu or ---- to specify set-user-ID mode or
  177.      not.  The third is gggg or ---- for the set-group-ID mode.  The rest of the
  178.      mode is a six digit octal number giving the owner, group, and other read,
  179.      write, execute permissions (see _c_h_m_o_d(1)).
  180.  
  181.      Two decimal number tokens come after the mode; they specify the user and
  182.      group IDs of the owner of the file.
  183.  
  184.      If the file is a regular file, the next token of the specification can be
  185.      a pathname whence the contents and size are copied.  If the file is a
  186.      block or character special file, two decimal numbers follow that give the
  187.      major and minor device numbers.  If the file is a symbolic link, the next
  188.      token of the specification is used as the contents of the link.  If the
  189.      file is a directory, _m_k_f_s__e_f_s makes the entries ....  and ........ and then reads
  190.      a list of names and (recursively) file specifications for the entries in
  191.      the directory.  As noted above, the scan is terminated with the token $$$$.
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. mmmmkkkkffffssss____eeeeffffssss((((1111MMMM))))                                                      mmmmkkkkffffssss____eeeeffffssss((((1111MMMM))))
  203.  
  204.  
  205.  
  206. RRRREEEECCCCOOOOVVVVEEEERRRRYYYY OOOOPPPPTTTTIIIIOOOONNNN
  207.      The ----rrrr flag causes _m_k_f_s__e_f_s to write only the superblock, without
  208.      touching the remainder of the filesystem space.  This allows a last-ditch
  209.      recovery attempt on a filesystem whose superblocks have been destroyed:
  210.      by running _m_k_f_s__e_f_s on the device with the ----rrrr option, a superblock is
  211.      created from which _f_s_c_k(1M) can obtain the geometry information it needs
  212.      to analyze the filesystem.
  213.  
  214.      Note that this procedure is only of use if the regenerated superblock
  215.      matches the parameters of the original filesystem.  If the filesystem was
  216.      created using the long form invocation, parameters identical to the
  217.      original invocation must be given with the ----rrrr option.  Note also that
  218.      filesystem defaults may change from release to release to allow more
  219.      efficient use of newer disk technologies; thus, the ----rrrr option may not be
  220.      useful for filesystems created under IRIX versions other than the version
  221.      being run.
  222.  
  223.      It should be clear that this is a limited recovery facility; it does not
  224.      help if, for example, the root directory of the filesystem has been
  225.      destroyed.
  226.  
  227. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  228.      chmod(1), mkfp(1M), mkfs(1M), mkfs_xfs(1M), dir(4), efs(4).
  229.  
  230. BBBBUUUUGGGGSSSS
  231.      With a prototype file, it is not possible to specify hard links.
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.